package com.longge.wechat.entity;

import java.util.Date;

import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Basic;

import com.longge.wechat.utils.ExcelAnnotation;

@Table(name = "usermessage", schema = "", catalog = "exercise")//对应的表名和数据库名
@Entity
public class UserMessageEntity {
	private Integer id;
	@ExcelAnnotation
	private String openId;//发信人Id
	@ExcelAnnotation
	private String msgType;//消息类型
	private String mediaId2;//语音消息Id
	@ExcelAnnotation
	private Date createTime;//消息创建时间
	@ExcelAnnotation
	private String content;//消息内容
	private String mediaId1;//图片消息媒体id
	@ExcelAnnotation
	private float x;//用户位置坐标x
	@ExcelAnnotation
	private float y;//用户位置坐标y
	
	private Integer msgId;
	
	@Column(name = "id", nullable = false, insertable = true, updatable = true, length = 11, precision = 0)
    @Id //自增的id，主键
    @GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	
	@Column(name = "openId", nullable = true, insertable = true, updatable = true, length = 20, precision = 0)
    @Basic
	public String getOpenId() {
		return openId;
	}
	public void setOpenId(String openId) {
		this.openId = openId;
	}
	
	@Column(name = "msgType", nullable = true, insertable = true, updatable = true, length = 20, precision = 0)
    @Basic
	public String getMsgType() {
		return msgType;
	}
	public void setMsgType(String msgType) {
		this.msgType = msgType;
	}
	
	
	@Column(name = "createTime", nullable = true, insertable = true, updatable = true, length = 20, precision = 0)
    @Basic
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Column(name = "content", nullable = true, insertable = true, updatable = true, length = 2048, precision = 0)
    @Basic
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
	@Column(name = "mediaId1", nullable = true, insertable = true, updatable = true, length = 64, precision = 0)
    @Basic
	public String getMediaId1() {
		return mediaId1;
	}
	public void setMediaId1(String mediaId1) {
		this.mediaId1 = mediaId1;
	}
	
	@Column(name = "mediaId2", nullable = true, insertable = true, updatable = true, length = 64, precision = 0)
    @Basic
	public String getMediaId2() {
		return mediaId2;
	}
	public void setMediaId2(String mediaId2) {
		this.mediaId2 = mediaId2;
	}
	
	@Column(name = "x", nullable = true, insertable = true, updatable = true, length = 12, precision = 0)
    @Basic
	public float getX() {
		return x;
	}
	public void setX(float x) {
		this.x = x;
	}
	
	@Column(name = "y", nullable = true, insertable = true, updatable = true, length = 12, precision = 0)
    @Basic
	public float getY() {
		return y;
	}
	public void setY(float y) {
		this.y = y;
	}
	
	@Column(name = "msgId", nullable = true, insertable = true, updatable = true, length = 11, precision = 0)
    @Basic
	public Integer getMsgId() {
		return msgId;
	}
	public void setMsgId(Integer msgId) {
		this.msgId = msgId;
	}
}
